package com.ljh.cvsspringboot.contorller;

import com.ljh.cvsspringboot.entity.Supplier;

import com.ljh.cvsspringboot.service.SupplierService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author 27013
 **/

@Controller
@RequestMapping(value = "/sys/supplier")
public class SupplierController {
    @Resource
    private SupplierService supplierService;

    @GetMapping(value = "/list")
    public String supplerList(Model model){
        List<Supplier> supplierList=supplierService.list();
        model.addAttribute("supplierList",supplierList);
        return "supplier/list";
    }
}
